package com.itheima.sh.bulk.mapper;

import com.itheima.sh.bulk.pojo.Sku;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 商品表 Mapper 接口
 * </p>
 *
 * @author hl
 * @since 2020-12-29
 */
public interface SkuMapper extends BaseMapper<Sku> {
    @Select("SELECT id, `name`,price,num,image,create_time,category_id,category_name,brand_name from tb_sku")
    List<Sku> findData();

    @Select("SELECT id, `name`,price,num,image,create_time,category_id,category_name,brand_name from tb_sku LIMIT  #{startIndex},#{number}")
    List<Sku> findDataLimit(@Param("startIndex") Integer startIndex, @Param("number") Integer number);
}
